# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor: Robert Boisvert <rdboisvert@gmail.com>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=sipp
pkgver=3.7.3
pkgrel=1
pkgdesc="Test tool / traffic generator for the SIP protocol"
url="https://github.com/SIPp/sipp"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	cmake
	libpcap-dev
	linux-headers
	lksctp-tools-dev
	ncurses-dev
	openssl-dev>3
	samurai
	"
source="https://github.com/SIPp/sipp/releases/download/v$pkgver/sipp-$pkgver.tar.gz
	32bit.patch
	"
options="!check" # tests have no direct target

build() {
	cmake -B build -G Ninja -Wno-dev \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None \
		-DUSE_PCAP=1 \
		-DUSE_SSL=1 \
		-DUSE_SCTP=1

	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -m444 -D pcap/* -t "$pkgdir"/usr/share/"$pkgname"/
}

sha512sums="
a04f8d02bd19068d5a6895e1c800f21ee7dc4355f9d7800579a7961c9388ad74144994a63a8fdfdc5b0fca09f7fd6ab004e14e5067e0ff9a79037194661abada  sipp-3.7.3.tar.gz
6dce2a8385685bf9856cab664553f81d6dda78460645c950dce2817db5f545b9b2f0d878c1de219d34abf30a253b3b3fb36b66d4042bac5130d31b6840d7ddee  32bit.patch
"
